﻿using System;
using System.Collections.Generic;
using ThatsMeSDK.Core;

namespace ThatsMeSDK
{
	/// <summary>
	/// Represent a User Gallery Category
	/// </summary>
	public class GalleryCategory
	{
		/// <summary>
		/// Category Id
		/// </summary>
		public int Id{get; set;}

		public string Nick { get; set; }
		
		/// <summary>
		/// Category Title
		/// </summary>
		public string Title{get; set;}
		
		/// <summary>
		/// Category Description
		/// </summary>
		public string Description{get; set;}
		
		/// <summary>
		/// The amount of pictures in the library
		/// </summary>
		public int PicsCount{get; set;}

		/// <summary>
		/// return all Pictures of this Category
		/// </summary>
		private List<GalleryPicture> categoryPictures;
		public List<GalleryPicture> CategoryPictures
		{
			get {
				if (categoryPictures == null)
				{
					categoryPictures = ServiceHandler.GetUserPics(Nick, Id);
				}

				return categoryPictures;

			}
			set { categoryPictures = value; }
		}

		public GalleryCategory(string _nick)
		{
			Nick = _nick;
		}
	}
}
